package com.tony.main;

import com.tony.thread.TaskPool;
import com.tony.utils.DateUtil;
import com.tony.utils.PropsUtil;
import com.tony.utils.TextUtil;

import java.util.Properties;

public class Main {

    public  static void main(String[] args){

        Properties prop = PropsUtil.loadProps("config.properties");
        String username=PropsUtil.getString(prop,"USERNAME","ttoonnyy");
        String password=PropsUtil.getString(prop,"PASSWORD","abcd8888");
        int itemId=PropsUtil.getInt(prop,"ITEMID",21702);
        int threadNum=PropsUtil.getInt(prop,"THREAD_NUMS",100);
        String dbPath=PropsUtil.getString(prop,"DB_PATH");
        long minId=PropsUtil.getLong(prop,"MIN_ID");
        long maxId=PropsUtil.getLong(prop,"MAX_ID");



        TaskPool taskPool=new TaskPool();
        taskPool.setUsername(username);
        taskPool.setPassword(password);
        taskPool.setItemId(itemId);
        taskPool.setMinId(minId);
        taskPool.setMaxId(maxId);
        taskPool.setdPath(dbPath);
        taskPool.setThreadNum(threadNum);
        taskPool.taskRun();

    }

}
